package info.douyi.dps.service;

import com.github.pagehelper.PageInfo;
import info.douyi.dps.model.DTO.req.PestUpdateRequestDTO;
import info.douyi.dps.model.DTO.resp.PestFrontResponseDTO;
import info.douyi.dps.model.Pest;
import info.douyi.dps.model.PestWithBLOBs;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface PestService {

    //获取所有的病虫害信息
    List<Pest> getAllPest();
    List<PestWithBLOBs> getAllPestWithBLOBs();

    PageInfo<Pest> getPestByPage(int pageNum, int pageSize);

    /**
     * 通过分类id获取分页的病虫害信息
     * @param bid
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<PestFrontResponseDTO> getPestByPageByBid(int bid, int pageNum, int pageSize);

    PageInfo<Pest> getPestByPageByBidAndPType(int bid, int pType, int pageNum, int pageSize);

    PestWithBLOBs getPestWithBLOBs(int id);

    Pest insertPest(PestWithBLOBs pest);

    Pest getPestByCNName(String cnName);

    int deletePestById(int id);

    int updatePest(Pest pest);

}
